package com.szc.demo01.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.szc.demo01.dao.SchduleMapper;
import com.szc.demo01.pojo.Schdule;
import com.szc.demo01.pojo.dto.SchduleAndEmpDto;
import com.szc.demo01.service.SchduleService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Slf4j
@Service
public class SchduleServiceImpl extends ServiceImpl<SchduleMapper, Schdule> implements SchduleService {
    @Resource
    private SchduleMapper schduleMapper;

    @Override
    public List<SchduleAndEmpDto> getall(long id){
        return this.schduleMapper.getall(id);
    }

    @Override
    public void add(Schdule e) {
        this.schduleMapper.add(e);
    }

    @Override
    public Schdule selectbyid(long id) {
        return this.schduleMapper.selectbyid(id);
    }

    @Override
    public List<SchduleAndEmpDto> getbyfinish(long state, long id) {
        return this.schduleMapper.getbyfinish(state,id);
    }

    @Override
    public void ensurefinish(Schdule s) {
        this.schduleMapper.ensurefinish(s);
    }

    @Override
    public List<SchduleAndEmpDto> getnotfinish(Integer t) {
        return this.schduleMapper.getnotfinish(t);
    }

}
